package cn.iocoder.yudao.module.chat.service.gpt;

import cn.iocoder.yudao.module.chat.dal.redis.history.gpt.ChatSessionRedisDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ChatSessionServiceImpl implements ChatSessionService{

    @Resource
    private ChatSessionRedisDao chatSessionRedisDao;
    @Override
    public void createChatSession(Long userId ,String sessionId) {
        chatSessionRedisDao.insertSession(userId,sessionId);
    }

    @Override
    public String getChatSession(Long userId) {
        return chatSessionRedisDao.getSession(userId);
    }
}
